import type TableColumn from "@/components/table/type/TableColumn.ts";
import type FormItem from "@/components/form/type/FormItem.ts";

/**
 * 查询条件表单结构数据
 */
export const searchSchema: FormItem[] = [
    {row: 0, span: 4, label: "部门名称", key: "departName", type: "input"},

    {row: 0, span: 4, label: "操作", key: "operate", type: "slot"},
]

/**
 * 表格结构数据
 */
export const tableColumns: TableColumn[] = [
    {key: "id", title: "序号", width: 80, align: "center", type: "index"},
    {key: "departName", title: "部门名称", align: "center", type: "string"},
    {key: "departCode", title: "部门编码", align: "center", type: "string"},
    {key: "type_dict", title: "部门类型", align: "center", type: "slot"},
    {key: "contactUserName_dict", title: "部门联系人", align: "center", type: "string"},
    {key: "address", title: "部门地址", align: "center", type: "string"},

    {key: "operate", title: "操作", width: 200, type: "slot", align: "center"},
]

/**
 * dialog结构数据
 */
export const dialogScheme: FormItem[] = [
    {row: 0, span: 12, label: "上级部门", key: "pid_dict", placeholder: "上级部门", type: "input", disabled: true},
    {row: 0, span: 12, label: "部门名称", key: "departName", placeholder: "部门名称", type: "input"},
    {
        row: 1, span: 12, label: "部门类型", key: "type", placeholder: "部门类型", type: "select", options: [
            {label: "公司", value: 1, type: "primary"},
            {label: "部门", value: 2, type: "success"},
            {label: "岗位", value: 3, type: "info"}
        ]
    },
    {row: 1, span: 12, label: "部门联系人", key: "contactUserName", placeholder: "部门联系人", type: "input"},
    {row: 2, label: "部门地址", key: "address", placeholder: "部门地址", type: "textarea"},
]